﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace Tester.Models
{
    public class VisualComponentFactory
    {
        public Border CreateBorder(Point startPoint, Point endPoint)
        {
            var border = new Border
            {
                BorderThickness = new Thickness(1.5),
                BorderBrush = new SolidColorBrush(Color.FromRgb(0xD1, 0xD1, 0xD1)),
                Background = new LinearGradientBrush
                {
                    StartPoint = startPoint,
                    EndPoint = endPoint,
                    GradientStops =
                                                        {
                                                            new GradientStop(Color.FromRgb(0xDB,0xDB,0xDB),0),
                                                            new GradientStop(Colors.White,1)
                                                        }

                }
            };

            return border;
        }
    }
}